package io.github.rascaler.dcenter.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @ClassName Candlestick
 * @Description TODO
 * @Author wurenqing
 * @Date 2023-11-23 11:06
 */
@Data
public class Instrument {
   private String symbol;

   private String name;

   private String base;

   private String quote;

   private Integer exchangeId;

   private Limit limits;

   private Precision precision;

   private Long onboardDate;

   private String status;

//   'precision': {
//      'amount': self.safe_integer_2(market, 'quantityPrecision', 'quantityScale'),
//              'price': self.safe_integer_2(market, 'pricePrecision', 'priceScale'),
//              'base': self.safe_integer(market, 'baseAssetPrecision'),
//              'quote': self.safe_integer(market, 'quotePrecision'),
//   },
//           'limits': {
//      'leverage': {
//         'min': None,
//                 'max': None,
//      },
//      'amount': {
//         'min': self.safe_number(market, 'minQty'),
//                 'max': self.safe_number(market, 'maxQty'),
//      },
//      'price': {
//         'min': None,
//                 'max': None,
//      },
//      'cost': {
//         'min': None,
//                 'max': None,
//      },
//   },

//   {"amount": {"min": 0.001, "max": 1000.0}, "price": {"min": 556.8, "max": 4529764.0}, "cost": {"min": 5.0, "max": null}, "leverage": {"min": null, "max": null}, "market": {"min": 0.001, "max": 120.0}}
   @Data
   @NoArgsConstructor
   @AllArgsConstructor
   public static class Limit {
        private Range amount;
        private Range price;
   }
//   {"amount": 3, "price": 1, "base": 8, "quote": 8}
   @Data
   @NoArgsConstructor
   @AllArgsConstructor
   public static class Precision {
      private Long amount;
      private Long price;
      private Long base;
      private Long quote;
   }

//   @Data
//   @NoArgsConstructor
//   @AllArgsConstructor
//   public static class Amount {
//      private BigDecimal min;
//      private BigDecimal max;
//   }

   @Data
   @NoArgsConstructor
   @AllArgsConstructor
   public static class Range {
      private BigDecimal min;
      private BigDecimal max;
   }
}